﻿<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="images/style.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
    <style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
</head>
<body style="font-size: 12px; v-text-align: center" leftmargin="0" topmargin="3"
    align="center" marginheight="0" marginwidth="0">
    <script language="javascript">
        function MakeHTML(id)
        { window.open("makehtml_comic.asp?type=page&id=" + id, "", "width=150,height=20,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no"); }
        function CheckAll(form) {
            for (var i = 0; i < form.elements.length; i++) {
                var e = form.elements[i];
                //		if (e.name != 'chkall')
                e.checked = true// form.chkall.checked;
            }
        }
        function CheckOthers(form) {
            for (var i = 0; i < form.elements.length; i++) {
                var e = form.elements[i];
                //		if (e.name != 'chkall')
                if (e.checked == false) {
                    e.checked = true; // form.chkall.checked;
                }
                else {
                    e.checked = false;
                }
            }
        }
    </script>
    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"
        style='margin-bottom: 5px'>
        <tr class="hback">
            <td bgcolor="e1e1e1" class="xingmu">
                <strong>漫画数据搜索</strong>
            </td>
        </tr>
        <form name="form" method="post" action="comics_manage.asp">
        <tr>
            <td height="18" bgcolor="#FFFFFF" class="hback">
                搜索：
                <input name="keyword" type="text" id="keyword" size="40">
                <input name="Submit3" type="submit" class="Submit" value="搜索">
                <a href="comics_manage.asp?zt=0&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>">
                    连载中</a> <a href="comics_manage.asp?zt=1&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>">
                        已完结</a> <a href="comics_manage.asp?zt=<%=request("zt")%>&tj=1&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>">
                            已推荐</a>
            </td>
        </tr>
        </form>
    </table>
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <form action="comic_admin.asp" method="post" name="dj">
        <tr>
            <td width="4%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">ID</font></div>
            </td>
            <td width="4%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">选择</font></div>
            </td>
            <td width="17%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">漫画名称</font></div>
            </td>
            <td width="13%" bgcolor="e7e7e7">
                <div align="center">
                    作者</div>
            </td>
            <td width="9%" bgcolor="e7e7e7">
                <div align="center">
                    分类</div>
            </td>
            <td width="19%" bgcolor="e7e7e7">
                <div align="center">
                    采集</div>
            </td>
            <td width="8%" bgcolor="e7e7e7">
                <div align="center">
                    状态</div>
            </td>
            <td width="6%" bgcolor="e7e7e7">
                <div align="center">
                    人气</div>
            </td>
            <td width="5%" bgcolor="e7e7e7">
                <div align="center">
                    推荐</div>
            </td>
            <td width="15%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">操作</font></div>
            </td>
        </tr>
        <%
     MaxPerPage=100
   if not isempty(request("page")) then 
      currentPage=cint(request("page")) 
   else 
      currentPage=1 
   end if 
if request("classid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " classid = '" & request("classid") & "' "
end if
if request("dqid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " dqid = '" & request("dqid") & "' "
end if
if request("zzid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " zzid = '" & request("zzid") & "' "
end if
if request("tj")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " tj = '" & request("tj") & "' "
end if
if request("zt")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " zt = '" & request("zt") & "' "
end if
if request("keyword")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " mhmc like '%" & trim(request("keyword")) & "%' "
end if
set rs=server.createobject("adodb.recordset")
sql="select * from comics " & search &" order by id desc"
rs.open sql,conn,1,1
allshu=rs.recordcount
if allshu<=0 then%>
        <tr bgcolor="#FFFFFF">
            <td height="40" colspan="10">
                <div align="center" class="STYLE1">
                    没有漫画</div>
            </td>
        </tr>
        <%
else
rs.pagesize=MaxPerPage 
mpage=rs.pagecount     
rs.move  (currentPage-1)*MaxPerPage
i=0
do while not rs.eof
id=rs("id")
classid=rs("classid")
mhmc=rs("mhmc")
mhtc=rs("mhtc")
zzid=rs("zzid")
tj=rs("tj")
zt=rs("zt")
        %>
        <tr>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%=id%></div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <input name="id" type="checkbox" value="<%=rs("id")%>">
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <a href="zj_manage.asp?comicid=<%=rs("id")%>&cjcomicid=<%=rs("cjitemid")%>">
                    <%=mhmc%></a>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from zz where id='"&zzid&"'"
rs2.open sql2,conn,1,1
if rs2.eof then%>
                    无
                    <%
else
zzmc=rs2("zzmc")
                    %>
                    <a href="?zzid=<%=zzid%>">
                        <%=zzmc%></a><%end if
rs2.close
                        %>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from class where id='"&classid&"'"
rs2.open sql2,conn,1,1
if rs2.eof then%>
                    无
                    <%
else
classname=rs2("classname")
                    %>
                    <a href="?classid=<%=classid%>" title="<%=mhtc%>">
                        <%=classname%></a>
                    <%end if
rs2.close
                    %>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%if rs("cjitemid")<>"" then
	cjitemid=rs("cjitemid")
	cjitemid1=Split(cjitemid,",")
                    %>
                    <a href="cj_comic.asp?cjid=<%=cjitemid1(0)%>">更新章节</a> <a href="cjzj_manage.aspx?cjcomicid=<%=cjitemid1(0)%>">
                        章节采集</a>
                    <%else%>没有配置采集<%end if%></div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%if zt=true then%>
                    已完结
                    <%else%>
                    <a href="comic_admin.asp?id=<%=id%>&act=zt&zt=1"><font color="#FF0000">连载中</font></a>
                    <%end if%>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%=rs("hits")%></div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%if TJ=true then%>
                    <a href="comic_admin.asp?id=<%=id%>&act=tj&tj=0">撤消</a>
                    <%else%>
                    <a href="comic_admin.asp?id=<%=id%>&act=tj&tj=1"><font color="#FF0000">推荐</font></a>
                    <%end if%>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <!--<a href="pic_downall.asp?type=comic&id=<%=rs("id")%>">下载</a>-->
                    <a href="pic_downall.aspx?type=comic&id=<%=rs("id")%>">下载</a> <a href="javascript:MakeHTML(<%=rs("id")%>)"
                        title="生成HTML页">生成</a> <a href="comic_add.aspx?id=<%=id%>&act=edit">修改</a> <a href="comic_admin.asp?id=<%=id%>&act=全部删除"
                            onclick="{if(confirm('确定删除此内容吗，操作将会把此漫画的全部章节一并删除!?')){return true;}return false;}">
                            删除</a>
                </div>
            </td>
        </tr>
        <%i=i+1  
if i>=MaxPerPage then exit do
 rs.movenext
 loop
 end if %>
        <tr>
            <td colspan="10" bgcolor="#FFFFFF">
                <input name='chkall' type="button" class="Submit" onclick='CheckAll(this.form)' value="全选">
                <input class="Submit" title="反向选择" onclick='CheckOthers(this.form)' type="button"
                    value="反选" name="button">
                <input name="act" type="submit" class="Submit" id="act" title="生成HTML" onclick="{if(confirm('确定生成HTML!?')){this.document.dj.submit();return true;}return false;}"
                    value="生成HTML" />
                <input name="act" type="submit" class="Submit" id="act" title="批量修改类别" onclick="{if(confirm('确定批量修改类别!?')){this.document.dj.submit();return true;}return false;}"
                    value="批量修改类别" />
                <input name="act" type="submit" class="Submit" id="act" title="批量修改类别" onclick="{if(confirm('确定批量选择类别!?')){this.document.dj.submit();return true;}return false;}"
                    value="批量选择类别" />
                <input name="act" type="submit" class="Submit" id="act" title="选定删除记录" onclick="{if(confirm('确定删除!?')){this.document.dj.submit();return true;}return false;}"
                    value="全部删除" />
            </td>
        </tr>
        <td colspan="10" bgcolor="#FFFFFF">
            &nbsp;页次：<b><font color="ff0000">
                <%=currentPage%>
            </font></b>/<b>
                <%=mpage%>
            </b>&nbsp;每页&nbsp;<b><font color="ff0000">
                <%=MaxPerPage%>
            </font></b>内容数&nbsp;<b><font color="ff0000">
                <%=allshu%>
            </font></b>
            <%pageno=currentPage  
		if cint(pageno)>1 then%>
            <a href="comics_manage.asp?page=1&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>"
                title="最前页">
                <%end if%>
                <font face="Webdings">9</font></a>
            <% if cint(pageno)>1 then%>
            <a href="comics_manage.asp?page=<%=currentPage-1%>&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>"
                title="上一页">
                <%end if%>
                <font face="Webdings">7</font></a>
            <%pp=cint(pageno)-2            
  if pp<1 then            
  pp=1            
  end if            
p=0
for pno=pp to mpage
p=p+1
if pno*1=cint(pageno)*1 then%>
            <font color="#FF0000">
                <%=pno%></font>
            <%else%>
            <a href="comics_manage.asp?page=<%=pno%>&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>"
                title="第<%=pno%>页">
                <%=pno%></a>
            <%end if%>
            <%if p>=5 then exit for            
next%>
            <% if cint(pageno)< mpage then%>
            &nbsp;<a href="comics_manage.asp?page=<%=currentPage+1%>&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>"
                title="下一页"><%end if%><font face="Webdings">8</font></a>&nbsp;
            <% if cint(pageno)< mpage then%>
            <a href="comics_manage.asp?page=<%=mpage%>&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>"
                title="最后页">
                <%end if%><font face="Webdings">:</font></a>&nbsp;&nbsp;<select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value"><script> var total_page=<%=mpage%>;var cur_page=<%=currentPage%>;for (i=1;i<=total_page;i++){  if (i == cur_page) {    document.write("<option selected value=comics_manage.asp?classid=<%=request("classid")%>&keyword=<%=request("keyword")%>&page="+i+">"+i+"</option>");  } else{    document.write("<option  value=comics_manage.asp?&zt=<%=request("zt")%>&tj=<%=request("tj")%>&classid=<%=request("classid")%>&dqid=<%=request("dqid")%>&zm=<%=request("zm")%>&cjid=<%=request("cjid")%>&zzid=<%=request("zzid")%>&keyword=<%=request("keyword")%>&page="+i+">"+i+"</option>");  }}</script></select>
        </td>
        </tr></form>
    </table>
</body>
</html>
